package com.hnzq.cloud.freshorderassembly.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.hnzq.cloud.dto.*;
import com.hnzq.cloud.freshorderassembly.domain.FreOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnzq.cloud.param.*;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 周皓月
 * @since 2022-02-06
 */
public interface IFreOrderService extends IService<FreOrder> {

    //TODO 分页条件查询订单（用户订单展示）
    PageOrdersDto findOrderByCondition(FindOrderParam findOrderParam);

    //TODO 根据单个订单id查询订单
    FreOrder findOrderByOrderId(Integer orderId);

    //TODO 修改订单的状态
    UpdateOrderStatusDto updateOrderStatus(UpdateOrderStatusParam updateOrderStatusParam) throws JsonProcessingException;

    //TODO 删除订单(逻辑删除)
    Boolean removeOrder(RemoveOrderParam removeOrderParam) throws JsonProcessingException;

    //TODO 新增订单
    AddOrderDto addOrder(AddOrderParam addOrderParam) ;

    //TODO 根据多个站点id查询所有订单
    PageOrdersDto findOrderBySiteIdList(FindOrderBySiteIdListParam findOrderBySiteIdListParam);

    //TODO 根据单个站点id查询所有订单
    PageOrdersDto findOrderBySiteId(FindOrderBySiteIdParam findOrderBySiteIdParam);

    //TODO 判断所有order是否存在所有id列表
    Boolean judgeOrderIds(JudgeOrderIdsParam judgeOrderIdsParam);

    //TODO 更新多个订单状态
    Integer updateOrderListStatus(UpdateOrderListStatusParam updateOrderListStatusParam);

    //TODO 取消订单
    String cancelOrderByOrderId(CancelOrderByOrderIdParam cancelOrderByOrderIdParam);

}
